char * convert(char * s, int numRows){
    int len = strlen(s);
    if(len == 1 || numRows == 1) {
        return s;
    }
    char *arr = (char*)malloc((len + 5) * sizeof(char));
    int counter = 0;
    int i = 0;
    /* 打印第一行数据 i + (n - 1) * 2 */
    while(i < len) {
        // printf("%c", s[i]);
        arr[counter] = s[i];
        counter++;
        i += (numRows - 1) * 2;
    }

    /* 打印第1 ~ numRows-1的数据 */
    for(i = 1; i < numRows - 1; i++) {
        int base = i;
        int counter1 = (numRows - i - 1) * 2;
        int counter2 = (numRows - i) * 2 - counter1;
        while(base < len) {
            // printf("%c", s[base]);
            arr[counter] = s[base];
            counter++;
            if(base + counter1 < len) {
                // printf("%c", s[base + counter1]);
                arr[counter] = s[base + counter1];
                counter++;
            }
            else {
                break;
            }
            base += (numRows - 1) * 2;
        }
    }

    /* 打印numRows行 */
    i = numRows - 1;
    while(i < len) {
        // printf("%c", s[i]);
        arr[counter] = s[i];
        counter++;
        i += (numRows - 1) * 2;
    }
    arr[counter] = '\0';
    return arr;
}